<% response.buffer=true '========================================================= ' File: list.asp ' Version:5.0 ' Date: 2002-9-20 ' Script Written by satan '========================================================= ' Copyright (C) 2001,2002 AspSky.Net. All rights reserved. ' Web: http://www.aspsky.net,http://www.dvbbs.net ' Email: info@aspsky.net,eway@aspsky.net '========================================================= Dim currentPage,tl,limitime Dim Fast_action Dim reBoard_Setting,BoardCount,k,ColSpanNum Dim Board_Count Dim TdTableWidth Dim master_3,master_4 dim onlinenum,guestnum Dim LastPost,Lastuser,LastID dim LastTime,LastUserid,LastRootid,body dim Pnum,p,replynum dim totalrec,ii,page_count dim n,pi dim call_info dim RsTopic dim cmd,AllTopNum,RsTop AllTopNum=0 Fast_action=false if boardmaster or master or superboardmaster then Fast_action=true else Fast_action=false end if if BoardID="" or (not isInteger(BoardID)) or BoardID="0" then Errmsg=Errmsg+"
"+"
  • 错误的版面参数!请确认您是从有效的连接进入。" founderr=true else BoardID=clng(BoardID) end if if cint(Board_Setting(2))=1 then if not founduser then Errmsg=Errmsg+"
    "+"
  • 本论坛为认证论坛,请登陆并确认您的用户名已经得到管理员的认证后进入。" founderr=true else if chkboardlogin(boardid,membername)=false then Errmsg=Errmsg+"
    "+"
  • 本论坛为认证论坛,请确认您的用户名已经得到管理员的认证后进入。" founderr=true end if end if end if if cint(Board_Setting(1))=1 then if Cint(GroupSetting(37))=0 then Errmsg=ErrMsg+"
    "+"
  • 您没有权限进入隐含论坛!" founderr=true end if end if if founderr then call nav() call head_var(2,0,"","") call dvbbs_error() else call nav() if Cint(Board_Setting(43))=0 then stats="帖子列表" else stats="论坛列表" end if call head_var(1,BoardDepth,0,0) call main() if founderr then call dvbbs_error() end if call footer() sub main() currentPage=request("page") if currentpage="" or not isInteger(currentpage) then currentpage=1 else currentpage=clng(currentpage) end if if request("selTimeLimit")="all" then tl="" elseif request("selTimeLimit")="" then tl="" else limitime=request("selTimeLimit") tl=" and dateandtime>='"&cstr(cdate(now()-limitime))&"' " end if stats=boardtype & "帖子列表" call activeonline() onlinenum=online(boardid) guestnum=guest(boardid) if trim(boardmasterlist)<>"" then master_1=split(boardmasterlist, "|") for i = 0 to ubound(master_1) master_2=""+master_2+""+master_1(i)+" " next else master_2="无版主" end if response.write ""&_ ""&_ ""&_ ""&_ "
    "&_ ""&_ ""&_ "
    "&_ "
    " %> <% k=0 Dim cBoardID dim simdisp simdisp=false Response.Cookies("BoardList").expires= date+7 cBoardID= Request("cBoardid") if isnumeric(cBoardID) then if request("CatLog")="N" then Response.Cookies("BoardList")(cBoardID & "BoardID")= "NotShow" else Response.Cookies("BoardList")(cBoardID & "BoardID")= "Show" end if end if if request.cookies("BoardList")(boardid & "BoardID")<>"NNotShow" then if BoardParentID=0 then sql="select * from board where (depth<="&Boarddepth&"+"&forum_setting(5)&" and ParentStr like '%"&BoardID&"%') or boardid="&boardid&" order by orders" else sql="select * from board where (depth<="&Boarddepth&"+"&forum_setting(5)&" and ParentStr like '%"&BoardParentStr&","&boardid&"%') or boardid="&boardid&" order by orders" end if 'response.write sql set rs=server.createobject("adodb.recordset") rs.open sql,conn,1,1 if not (rs.eof and rs.bof) then BoardCount=rs.recordcount if BoardCount>1 then do while not rs.eof k=k+1 reBoard_Setting=split(rs("Board_setting"),",") if rs("BoardMaster")<>"" and not isnull(rs("BoardMaster")) then master_3=split(rs("BoardMaster"), "|") for i = 0 to ubound(master_3) if i>6 then master_4=master_4 else master_4=master_4 & ""&master_3(i)&" " end if next if i>7 then master_4=master_4 & "More..." else master_4="暂无" end if if rs("ParentID")=0 or rs("boardid")=boardid then if request.cookies("BoardList")(rs("boardid") & "BoardID")="NotShow" then ColSpanNum=reBoard_Setting(41) simdisp=true elseif request.cookies("BoardList")(rs("boardid") & "BoardID")="Show" then simdisp=false ColSpanNum=2 else if Cint(reBoard_Setting(39))=1 then ColSpanNum=reBoard_Setting(41) simdisp=true else simdisp=false ColSpanNum=2 end if end if response.write "" response.write "" Board_Count=0 else if simdisp then call main_1_boardlist_2() else call main_1_boardlist_1() end if end if master_4="" rs.movenext if k " next response.write "" end if if rs("parentid")=0 then response.write "
     " if simdisp then response.write ""&rs("boardtype")&" [完全关闭]" else response.write ""&rs("boardtype")&" [完全关闭]" end if response.write "

    " simdisp=false ColSpanNum=2 end if else if Board_count " next response.write "" end if end if loop response.write "" end if rs.close set rs=nothing response.write "
    " end if if currentpage=1 then myCache.name="AllTopNum" if myCache.valid then if myCache.value>0 then set RsTop=server.createobject("adodb.recordset") sql="select TopicID,boardid,title,postusername,postuserid,dateandtime,child,hits,votetotal,lastpost,lastposttime,istop,isvote,isbest,locktopic,Expression from topic where istop=2 and locktopic<2 ORDER BY lastposttime desc" RsTop.open sql,conn,1,1 if RsTop.eof and RsTop.bof then AllTopNum=0 else AllTopNum=RsTop.recordcount end if myCache.add AllTopNum,dateadd("n",60,now) end if 'end by value else set RsTop=server.createobject("adodb.recordset") sql="select TopicID,boardid,title,postusername,postuserid,dateandtime,child,hits,votetotal,lastpost,lastposttime,istop,isvote,isbest,locktopic,Expression from topic where istop=2 and locktopic<2 ORDER BY lastposttime desc" RsTop.open sql,conn,1,1 if RsTop.eof and RsTop.bof then AllTopNum=0 else AllTopNum=RsTop.recordcount end if myCache.add AllTopNum,dateadd("n",60,now) end if 'end by valid end if 'end by page if limitime="" then totalrec=lasttopicnum else set rs=conn.execute("select count(topicid) from topic where boardID="&cstr(boardID)&" "&tl&"") totalrec=rs(0) end if set RsTopic=server.createobject("adodb.recordset") if IsAudit=1 then if not founduser then userid=0 sql="select TopicID,boardid,title,postusername,postuserid,dateandtime,child,hits,votetotal,lastpost,lastposttime,istop,isvote,isbest,locktopic,Expression from topic where boardID="&boardid&" and istop<2 and (locktopic<2 or (locktopic=3 and PostUserID="&userid&")) ORDER BY istop desc,lastposttime desc" else sql="select TopicID,boardid,title,postusername,postuserid,dateandtime,child,hits,votetotal,lastpost,lastposttime,istop,isvote,isbest,locktopic,Expression from topic where boardid="&boardid&" and istop<2 and locktopic<2 order by istop desc,lastposttime desc" end if RsTopic.open sql,conn,1 if RsTopic.eof and RsTopic.bof and Cint(Board_Setting(43))=0 and AllTopNum=0 then call BoardEmpty() elseif not (RsTopic.eof and RsTopic.bof) or (Cint(Board_Setting(43))=0 and AllTopNum>0) then call listinfo() end if end sub sub main_1_boardlist_1() if (Cint(reBoard_Setting(1))=1 and Cint(GroupSetting(37))=1) or Cint(reBoard_Setting(1))=0 then response.write "" LastPostInfo=split(rs("LastPost"),"$") if not isdate(LastPostInfo(2)) then LastPostInfo(2)=Now() '=========================BoardInfo============================ response.write ""&_ "
    " if reBoard_Setting(0)=1 then if datediff("h",lastlogin,LastPostInfo(2))=0 then response.write "有新帖子" else response.write "无新帖子" end if else if datediff("h",lastlogin,LastPostInfo(2))=0 then response.write "有新帖子" else response.write "无新帖子" end if end if response.write ""&_ ""&_ ""&_ ""&_ "" response.write "
    "&_ ""&rs("boardtype")&"" if rs("child")>0 then response.write "("&rs("child")&")" end if response.write "" if rs("indeximg")<>"" then response.write "
    " end if response.write "
    " if Cint(reBoard_Setting(2))=1 then response.write "认证论坛,请认证用户进入浏览" else response.write "主题:"&htmlencode(left(LastPostInfo(3),10))&"..
    作者:"&htmlencode(LastPostInfo(0))&"
    日期:" & FormatDateTime(LastPostInfo(2),1) & "" & FormatDateTime(LastPostInfo(2),4)&" " end if response.write "
    " response.write rs("readme") response.write"
    版主:"&master_4&"" response.write " " response.write "" response.write "
    今日帖 "&rs("TodayNum")&"主题 "&rs("LastTopicNum")&"文章 "&rs("LastBBSNum")&"
    " '============================End=============================== end if end sub sub main_1_boardlist_2() TdTableWidth=100/ColSpanNum if Board_Count=ColSpanNum or Board_Count=0 then response.write "" response.write "" if (Cint(reBoard_Setting(1))=1 and Cint(GroupSetting(37))=1) or Cint(reBoard_Setting(1))=0 then response.write "
    版主:"&master_4&""" colspan=2>"&rs("boardtype")&"" if rs("child")>0 then response.write "("&rs("child")&")" end if response.write "
    今日:"&rs("TodayNum")&"发贴:"&rs("LastBbsNum")&"
    " end if response.write "" if Board_Count=ColSpanNum-1 then response.write "" if Cint(Board_Count)>Cint(ColSpanNum)-1 then Board_Count=1 else Board_Count=Board_Count+1 end if end sub sub listinfo() response.write ""&_ ""&_ "" if request("action")="off" then call onlineuser(0,0,boardid) elseif request("action")="show" then call onlineuser(1,1,boardid) else call onlineuser(Forum_Setting(14),Forum_Setting(15),boardid) end if response.write "
    总在线"&Forum_OnlineNum&"人,其中"& boardtype &"上共有 "& onlinenum &" 位会员与 "& guestnum &" 位客人.今日贴子 "& todaynum &" " if request("action")="show" then response.write "[关闭详细列表]" else if cint(Forum_Setting(14))=1 and request("action")<>"off" then response.write "[关闭详细列表]" else response.write "[显示详细列表]" end if end if response.write "

    " response.write ""&_ ""&_ ""&_ "
    " if (Cint(Board_Setting(43))=0 and Cint(Board_Setting(0))=0) or (Cint(Board_Setting(43))=0 and Cint(Board_Setting(0))=1 and (master or superboardmaster or boardmaster)) then response.write "发新帖"&_ "  发起新投票"&_ "  发布小字报" elseif Cint(Board_Setting(0))=1 then response.write "本论坛已锁定,不允许进行发贴/回帖等操作" end if response.write " "& master_2 &"
    " response.write ""&_ ""&_ ""&_ ""&_ ""&_ ""&_ ""&_ ""&_ ""&_ "" if RsTopic.bof and RsTopic.eof and AllTopNum=0 then response.write "" else '=========================All Top========================= if currentpage=1 and alltopnum>0 then do while not RsTop.eof page_count=page_count+1 response.write "" response.write "" response.write "" response.write "" response.write "" Lastuser="" LastID="" LastTime="" body="" RsTop.movenext loop set RsTop=nothing end if '============================end========================== if totalrec mod Cint(Board_Setting(26))=0 then n= totalrec \ Cint(Board_Setting(26)) else n= totalrec \ Cint(Board_Setting(26))+1 end if if not (RsTopic.bof and RsTopic.eof) then RsTopic.MoveFirst if currentpage > n then currentpage = n if currentpage<1 then currentpage=1 RsTopic.Move (currentpage-1) * Cint(Board_Setting(26)) do while not RsTopic.eof and page_count" response.write "" response.write "" response.write "" response.write "" '===========================End============================ Lastuser="" LastID="" LastTime="" body="" RsTopic.movenext loop end if set RsTopic=nothing if request("action")="batch" then response.write "" end if response.write "" end if set rs=nothing if totalrec mod Board_Setting(26)=0 then n= totalrec \ Board_Setting(26) else n= totalrec \ Board_Setting(26)+1 end if if currentpage-1 mod 10=0 then p=(currentpage-1) \ 10 else p=(currentpage-1) \ 10 end if dim pagelist,pagelistbit response.write "
    "&_ ""&_ ""&_ "
    广播: "&_ "" set rs=conn.execute("SELECT TOP 5 s_id,s_username,s_title FROM smallpaper where datediff('d',s_addtime,Now())<=1 and s_boardid="&boardid&" ORDER BY s_addtime desc") do while not rs.eof response.write ""&htmlencode(rs(1))&"说:"&htmlencode(rs(2))&"" rs.movenext loop set rs=nothing response.write "精华 | 在线 | 事件 | 权限 | 管理" if isaudit=1 then dim allaudit set rs=conn.execute("select count(*) from "&Nowusebbs&" where boardid="&boardid&" and locktopic=3") allaudit=rs(0) if isnull(allaudit) then allaudit=0 set rs=nothing response.write " | 审核("&allaudit&")" end if response.write "
    "&_ "
    状态主 题 (点即可展开贴子列表)作 者回复/人气最后更新 | 回复人
    本论坛暂无内容,欢迎发贴:)
    " 'response.write RsTop("lastposttime") response.write "总固顶主题" response.write "" if RsTop(6)=0 then response.write "" else response.write "" end if if not isnull(RsTop("lastpost")) then LastPost=split(RsTop("lastpost"),"$") if ubound(LastPost)=7 then Lastuser=htmlencode(LastPost(0)) LastID=LastPost(1) LastTime=LastPost(2) if not isdate(LastTime) then LastTime=RsTop("dateandtime") body=htmlencode(LastPost(3)) if not isnull(LastPost(4)) and LastPost(4)<>"" then response.write "" LastUserid=LastPost(5) LastRootid=LastPost(6) else Lastuser="------" LastID=RsTop("topicid") LastTime=RsTop("dateandtime") body="..." LastUserid=RsTop("postuserid") LastRootid=RsTop("topicid") end if else Lastuser="------" LastID=RsTop("topicid") LastTime=RsTop("dateandtime") body="..." LastUserid=RsTop("postuserid") LastRootid=RsTop("topicid") end if if LastTime=RsTop("dateandtime") then LastUser="" response.write "作者:"& htmlencode(RsTop("postusername")) &"
    发表于"& RsTop("dateandtime") &"
    最后跟贴:"& body &"..."">" if len(RsTop("title"))>26 then response.write left(htmlencode(RsTop("title")),26)&"..." else response.write htmlencode(RsTop("title")) end if response.write "
    " replynum=RsTop("child")+1 if replynum>Cint(Board_Setting(27)) then response.write "  [" if replynum mod Cint(Board_Setting(27))=0 then Pnum= replynum \ Cint(Board_Setting(27)) else Pnum= replynum \ Cint(Board_Setting(27))+1 end if for p=1 to Pnum response.write " "&p&" " if p+1>7 then response.write "... "&Pnum&"" exit for end if next response.write "]" else pnum=1 end if response.write "
    "& htmlencode(RsTop("postusername")) &"" if RsTop("isvote")=1 then response.write ""&RsTop("votetotal")&" 票" else response.write RsTop("child") &"/"& RsTop("hits") end if response.write "  " response.write FormatDateTime(LastTime,2)&" "&FormatDateTime(LastTime,4)&" | " if LastUser="" then response.write "------" else response.write ""&LastUser&"" end if response.write "
    正在读取关于本主题的跟贴,请稍侯……
    " 'response.write rstopic("lastposttime") if request("action")="batch" and Cint(GroupSetting(45))=1 then response.write "" else if RsTopic("istop")=2 then response.write "总固顶主题" elseif RsTopic("istop")=1 then response.write "固顶主题" elseif RsTopic("isbest")=1 then response.write "精华帖子" elseif RsTopic("isvote")=1 then response.write "投票贴子" elseif RsTopic("locktopic")=1 then response.write "本主题已锁定" elseif RsTopic("child")>=Cint(forum_setting(44)) then response.write "热门主题" else response.write "开放主题" end if end if response.write "" if RsTopic(6)=0 then response.write "" else response.write "" end if if not isnull(RsTopic("lastpost")) then LastPost=split(RsTopic("lastpost"),"$") if ubound(LastPost)=7 then Lastuser=htmlencode(LastPost(0)) LastID=LastPost(1) LastTime=LastPost(2) if not isdate(LastTime) then LastTime=RsTopic("dateandtime") body=htmlencode(LastPost(3)) if not isnull(LastPost(4)) and LastPost(4)<>"" then response.write "" LastUserid=LastPost(5) LastRootid=LastPost(6) else Lastuser="------" LastID=RsTopic("topicid") LastTime=RsTopic("dateandtime") body="..." LastUserid=RsTopic("postuserid") LastRootid=RsTopic("topicid") end if else Lastuser="------" LastID=RsTopic("topicid") LastTime=RsTopic("dateandtime") body="..." LastUserid=RsTopic("postuserid") LastRootid=RsTopic("topicid") end if if LastTime=RsTopic("dateandtime") then LastUser="" response.write "作者:"& htmlencode(RsTopic("postusername")) &"
    发表于"& RsTopic("dateandtime") &"
    最后跟贴:"& body &"..."">" if len(RsTopic("title"))>26 then response.write left(htmlencode(RsTopic("title")),26)&"..." else response.write htmlencode(RsTopic("title")) end if response.write "
    " replynum=RsTopic("child")+1 if replynum>Cint(Board_Setting(27)) then response.write "  [" if replynum mod Cint(Board_Setting(27))=0 then Pnum= replynum \ Cint(Board_Setting(27)) else Pnum= replynum \ Cint(Board_Setting(27))+1 end if for p=1 to Pnum response.write " "&p&" " if p+1>7 then response.write "... "&Pnum&"" exit for end if next response.write "]" else pnum=1 end if response.write "
    "& htmlencode(RsTopic("postusername")) &"" if RsTopic("isvote")=1 then response.write ""&RsTopic("votetotal")&" 票" else response.write RsTopic("child") &"/"& RsTopic("hits") end if response.write "  " response.write FormatDateTime(LastTime,2)&" "&FormatDateTime(LastTime,4)&" | " if LastUser="" then response.write "------" else response.write ""&LastUser&"" end if response.write "
    正在读取关于本主题的跟贴,请稍侯……
    全选/取消 批量删除 批量移动 批量精华 批量锁定 批量固顶
    " response.write ""&_ ""&_ ""&_ ""&_ ""&_ ""&_ "
    页次:"& currentPage &"/"& n &"页 每页"& Board_Setting(26) &" 主题数"& totalrec &"
    分页:" if currentPage=1 then response.write "9 " else response.write "9 " end if if p*10>0 then response.write "7 " response.write "" for ii=p*10+1 to P*10+10 if ii=currentPage then response.write ""+Cstr(ii)+" " else response.write ""+Cstr(ii)+" " end if if ii=n then exit for 'p=p+1 next response.write "" if ii8 " if currentPage=n then response.write ": " else response.write ": " end if response.write "转到:
    " response.write ""&_ ""&_ ""&_ ""&_ ""&_ "
    "&_ "快速搜索: "&_ "
    "&_ "

    " response.write ""&_ ""&_ ""&_ ""&_ "
     -=> "& Forum_info(0) &"图例所有时间均为 - "&Forum_info(9)&"  
    "&_ ""&_ ""&_ ""&_ ""&_ ""&_ ""&_ ""&_ ""&_ ""&_ "
    开放的主题 回复超过"&forum_setting(44)&"贴 锁定的主题 固顶的主题 总固顶的主题 精华帖子 投票帖子
    "&_ "
    " end sub sub BoardEmpty() response.write ""&_ ""&_ ""&_ "
    发新帖"&_ "  发起新投票"&_ "  发布小字报 "& master_2 &"
    "&_ ""&_ ""&_ ""&_ ""&_ ""&_ ""&_ ""&_ ""&_ "
    状态主 题 (点即可展开贴子列表)作 者回复/人气最后更新 | 回复人
    本论坛暂无内容,欢迎发贴:)

    " end sub 'if instr(scriptname,"index.asp")>0 or instr(scriptname,"list.asp")>0 then 'if Forum_ads(2)=1 then 'call admove() 'end if 'if Forum_ads(13)=1 then 'call fixup() 'end if 'end if %>